Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Amiberry: Update and further rework #3252

Merged
merged 5 commits into from
Dec 5, 2019
Merged

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Dec 3, 2019

Status: Ready

Reference: #3181

Commit list/description:

  • DietPi-Software | Amiberry: Update to current upstream v3.0.4, including Stretch binaries and merge SDL2 libraries right into the Amiberry install dir
  • DietPi-Software | Amiberry: Download archives are not split per platform to provide smaller downloads and less file moving hassle
  • DietPi-Software | Amiberry: autostart.uae has been removed, as it contained obviously auto-created defaults from an RPi1 instance and non-existent file paths. Re-evaluation if a default file makes sense should be done, then it should be named default.uae, which is used by Amiberry automatically, if present, since some versions ago

+ DietPi-Software | Amiberry: Update to current upstream v3.0.4, including Stretch binaries and merge SDL2 libraries right into the Amiberry install dir
+ DietPi-Software | Amiberry: Download archives are not split per platform to provide smaller downloads and less file moving hassle
+ DietPi-Software | Amiberry: autostart.uae has been removed, as it contained obviously auto-created defaults from an RPi1 instance and non-existent file paths. Re-evaluation if a default file makes sense should be done, then it should be named default.uae, which is used by Amiberry automatically, if present, since some versions ago
+ DietPi-Software | Amiberry: Load SDL2 libraries from Amiberry install dir
+ CHANGELOG | Amiberry: Resolved an issue where the binary fails to execute on Odroid XU4
+ DietPi-Software | Amiberry: Restore old configs and data before moving new instance in place
+ DietPi-Patch | Reinstall/update Amiberry and be more verbose on what we're patching (WIP)
@MichaIng MichaIng merged commit 2141687 into dev Dec 5, 2019
@MichaIng MichaIng deleted the amiberry branch December 5, 2019 12:38
@actraiser30
Copy link

Hi, will you update the image of Amiberry to buster?

thanks

@MichaIng
Copy link
Owner Author

MichaIng commented Dec 14, 2019

Yes Buster ready Amiberry v2.26 does already exist for RPi and Asus TB, the new version 3.0.9 is as well ready for Buster (aside of Odroid XU4 Buster currently) and can be tested via current DietPi beta.

@actraiser30
Copy link

Is it possible to make a seperate image for the raspbery pi boards only with Amiberry ?

thanks

@MichaIng
Copy link
Owner Author

@actraiser30
Yes, I'll update our Amiberry images once v6.27 has been released. Like now it will not be a pre-installed image, but will be configured to install latest Amiberry automatically on first boot, after login.

@actraiser30
Copy link

thanks

how can i install the DietPi beta to test amiberry?

@MichaIng
Copy link
Owner Author

https://github.com/MichaIng/DietPi/blob/master/BRANCH_SYSTEM.md#steps-to-use-the-dietpi-beta-branch

Please wait until the night, I'm just preparing to merge the next beta version: #3270

@actraiser30
Copy link

actraiser30 commented Dec 20, 2019

As i thought Amiberry in beta has the same problem/bug as in stable, when i press start to launch a pre-installed workbench hdf(hardfile) that i already did with amiberry in retropie, it exits in command line ,when i try to install a workbench from scratch,it gets an error that the hdf(hardfile) its not a dos disk instead of start the installation as it happens in amiberry in retropie

have you noticed this problem/bug?

Basically you cannot do anything with Amiberry than only look the Gui

I installed Amiberry with normal user dietpi and it does the same so it must be an issue with dietpi it self.

You can you try it your self,just install amiberry and after the Gui launch press start it will exit to command line instead of prompt you for a system disk/rom

@MichaIng
Copy link
Owner Author

@actraiser30
Quick check the service log when you used Amiberry autostart option: journalctl -u amiberry
Which device do you run it on and which Debian version?
Did you try it with a fresh install + fresh configs, means uninstall it before installing it through dietpi-software.
And can you try to run Amiberry from console manually (when you used autostart option/service before), and check for console output when it exits:

cd /mnt/dietpi_userdata/amiberry
LD_LIBRARY_PATH='/mnt/dietpi_userdata/amiberry/libs ./amiberry

@actraiser30
Copy link

actraiser30 commented Dec 20, 2019

Fresh install on a Raspberry Pi 3B with latest buster image,first dietpi updated the OS and it self, and then i choose to install it from the software section,i also run it manual from console with systemctl start amiberry, same thing happening and i install it also in the normal stretch amiberry image same there too

i will check the log and the console output later and let you know

@MichaIng
Copy link
Owner Author

@actraiser30
Okay, full logs should be present when not using the service but execute the binary directly as above.

@actraiser30
Copy link

actraiser30 commented Dec 20, 2019

sorry i gave you a wrong photo before without the command

i execute the command

after i run the journalctl -u amiberry i got this log in the 2 photos in the link under:

https://ibb.co/zZ2RL3y

https://ibb.co/2KKn19g

@MichaIng
Copy link
Owner Author

MichaIng commented Dec 20, 2019

@actraiser30
Hmm, a segmentation fault around libc6. Since the service terminates right after start, it should not even show up the GUI, does it?
Could you assure that all packages are up to date: apt update && apt full-upgrade

My last real-world test on RPi was with the last binary version 3.0.4, not yet 3.0.9. But those binaries were taken from Amiberry release (like the last ones), hence should match Raspbian Buster libc6 etc: https://github.com/midwan/amiberry/releases/tag/v3.0.9

@midwan
Are you able to decrypt the stack trace? Since we use standard Raspbian Buster repo, libc6 should match and as said above I took your compiled binaries for our Amiberry for RPi archives. Is it possible that this happened within libSDL2, which I compiled on Raspbian Buster as well, but this should be the only difference. capsimg was compiled by me as well from master branch, so there might be a difference as well.

@midwan
Copy link

midwan commented Dec 20, 2019

@MichaIng
The capsimg is the least relevant in this case, as that library is only used in one specific scenario: if you try to load .ipf disk images.

It might be related to either SDL2 or something else, it's hard to tell from just this. Have you tried compiling Amiberry from source on the same platform? Does it behave the same way if you do? In that case, it might be related to something external, like SDL2. But if it does work, then the difference in somewhere between the pre-compiled environment (Raspbian Buster Desktop) and DietPi's image.

@MichaIng
Copy link
Owner Author

MichaIng commented Dec 20, 2019

@midwan
DietPi RPi images are based on Raspbian Buster Lite, but the APT repo and all pulled dependency packages exactly match the Raspbian Buster desktop image, there is as well no additional APT source, from were non-matching packages could be pulled.
About capsimg, I remember comparing this with your build and it matched 100% for RPi, so yeah this isn't it for sure.

@actraiser30
Just to clarify:

  • With current DietPi beta/dev (v6.27), Amiberry starts into GUI as you mentioned first, or does it fail immediately (which is what the logs look like)?
  • With current DietPi stable (v6.26) it was the same?

In case we can rule out SDL2 ARMv7 vs ARMv6 and Amiberry v2.25 vs Amiberry v3.0.X: On DietPi v6.26, Amiberry v2.25 with ARMv7 SDL2 libs on RPi3 are pulled, while on DietPi v6.27 it's Amiberry v3.0.9 with ARMv6 SDL2 libs, as those were all build on Raspbian, which from APT packages is all ARMv6.

I'm still thinking if there could be benefits to use ARMv7 SDL2 libs on RPi2/3/4, using full kernel arch capabilities, however it would break SDcard swapping between models, and if any, benefits should be minimal only.

I compared the SDL2 (ARMv6) libs from v6.26 with the ones packed with Amiberry for v6.27 and they match up to the last byte. This just shows that both were build within exactly matching environments, and with those libs, ARMv7 as well as ARMv6 I successfully tested it on my RPi2. And of course I would expect many other reports, if it generally failed on RPi3 with v6.26 already.

If even the Stretch image fails, then I start to thinking that something is wrong with this RPi, since on DietPi v6.26 Stretch the old very well mass tested and used Amiberry v2.25 with fully-fleshed older SDL2 libs, build by Fourdee, are used, which has nothing to do with my new builds at all. Updated Stretch version is pulled only with DietPi v6.27 beta and dev code 🤔.
@actraiser30 you meant this one, right? https://dietpi.com/downloads/images/DietPi_RPi-ARMv6-Stretch_AmiBerry.7z

@actraiser30
Copy link

actraiser30 commented Dec 21, 2019

it shows the Gui but it does not do anything further than that

With both stable and beta the results are the same it loads the Gui and crashes if you press start
also the same if i use the pre-installed amiberry stretch image

Yes that image (https://dietpi.com/downloads/images/DietPi_RPi-ARMv6-Stretch_AmiBerry.7z)

i installed Retropie in Dietpi and after i install Amiberry from Retropie it works great like that so it must be something wrong with the Amiberry install script for Dietpi or the service
maybe it installs something that is conflicting with it

This is the script under used to install Amiberry from Retropie it installs SDL2 and builds Amiberry,Dietpi script only downloads the pre-made binary, maybe it will help you solve the problem:

https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/emulators/amiberry.sh

@MichaIng
Copy link
Owner Author

MichaIng commented Dec 21, 2019

@actraiser30
Okay, especially the failing Stretch image is very strange, since this worked for ages without any changes meanwhile. I checked the RetroPie script and they do no relevant differences, besides using a wrong/outdated platform string for ASUS Tinker Board 😉. However what is indeed a difference is that they install SDL2 from APT repository, which does not work in Stretch for RPi, but on Buster.

This is actually something you can test easily (on current beta/dev v6.27 Buster at best, on Stretch this will not work!) to check if it's really the SDL2 which somehow does not work on your system, or the amiberry build itself:

apt install libsdl2 libsdl2-ttf libsdl2-image
/mnt/dietpi_userdata/amiberry/amiberry
  • This starts the binary manually, so output is done to console instead of journal.
  • This is required since the systemd unit overrides SDL2 by our own compiled version in /mnt/dietpi_userdata/amiberry/lib.

@actraiser30
Copy link

actraiser30 commented Dec 21, 2019

i tried to instal sdl2 but apt could not find the packages so i installed the ibsdl2-dev libsdl2-ttf-dev libsdl2-image-dev packages run the amiberry with the /mnt/dietpi_userdata/amiberry/amiberry
and got an error something about the xdg manager could not initialize EGL
i run it with the autostart and upon pressing start at the Gui it exited
updated to the new beta updated amiberry but got the same result after

If it was working before then something happen after an update something installed or changed and conflicting with amiberry,as a suggestion maybe you can try build amiberry instead of taking the binary.

@MichaIng
Copy link
Owner Author

MichaIng commented Dec 22, 2019

@actraiser30
Ah sorry the libSDL2 packages have version strings, hence: apt install libsdl2-2.0-0 libsdl2-ttf-2.0-0 libsdl2-image-2.0-0
The dev packages pull then anyway.

as a suggestion maybe you can try build amiberry instead of taking the binary.

We want to prevent the up to 1 hour taking build on slow SBCs, hence the pre-compiled binaries.
As I mentioned above, those pre-compiled binaries match 100% between different Raspbian environments, between those compiled by me, on real RPi, on emulated RPi and by midwan, and those run fine for other users, since I didn't receive a single other bug report like yours. So no problem with those binaries in general, but we need to find out what is different in your case, so we can assure this is changed/corrected on install.

and got an error something about the xdg manager could not initialize EGL

Can you please paste: apt show libsdl2-2.0-0
And assure that fkms is enabled: /DietPi/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d

And as suggested by midwan, it would be great if you could try an own source build, if all above does not help:

apt install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libxml2-dev libflac-dev libmpg123-dev libpng-dev libmpeg2-4-dev libraspberrypi-dev
rm -R /mnt/dietpi_userdata/amiberry
cd /tmp
wget https://github.com/midwan/amiberry/archive/v3.0.9.tar.gz
tar xf master.tar.gz
rm master.tar.gz
mv amiberry-master /mnt/dietpi_userdata/amiberry
cd /mnt/dietpi_userdata/amiberry
make -j4 PLATFORM=rpi3
# Test it
./amiberry

Alternatively you could try the binaries compiled by midwan:

rm -R /mnt/dietpi_userdata/amiberry
mkdir -p /mnt/dietpi_userdata/amiberry
cd /mnt/dietpi_userdata/amiberry
wget https://github.com/midwan/amiberry/releases/download/v3.0.9/amiberry-rpi3-v3.0.9.zip
unzip amiberry-rpi3-v3.0.9.zip
rm amiberry-rpi3-v3.0.9.zip
chmod +x amiberry
./amiberry

@actraiser30
Copy link

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
deb https://archive.raspberrypi.org/debian/ buster main ui

@MichaIng
Copy link
Owner Author

MichaIng commented Dec 22, 2019

@actraiser30
I edited my post (see above), sources.list entries are fine, I didn't think about the version string in package names 😉.

@actraiser30
Copy link

i have some trouble tranfer some hdf file to test it with proftp server,it opens the gui and when i click to any folder it closes the gui with security errors,is it possible to install the midnight commander file manager used in retropie its super easy to use and fast,??
if i boot to raspbian insert the card with the amiberry to a card reader anc copy the files like that will it be any problem after with the amiberry? eg dependecy errors ?

@MichaIng
Copy link
Owner Author

@actraiser30
Are you trying this as root? Since the Amiberry service is stated as root, it should be able to access anything, if not, AFAIK by default on DietPi FTP server and client are both installed so that user and group "dietpi" have full R/W access.

Aside of that, copying or Amiberry dir + /etc/systemd/system/amiberry.service to launch to Raspbian or installing midnight commander on DietPi should generally both work. But you need to take care that required libraries for Amiberry are installed on Raspbian as well (as above).

@actraiser30
Copy link

actraiser30 commented Dec 23, 2019

if i tranfer the files from raspbian desktop amiberry behaves strange after its like the dependecies or files are destroyed or something, i think the crashing was caused coz of this
Can you put midnight commander to the file servers available for install?

@MichaIng
Copy link
Owner Author

@actraiser30
Simply run: apt install mc
You should be able then to start it from any desktop or probably via xinit as well from console.

@actraiser30
Copy link

Got it althrough amiberry 2.25 in stable seems to work with Raspberry pi 4 this version (2.25) does not exists for Rpi4 strange only from version 3.0.0 and up there is Rpi4 support.but still it does not accept the pre-made hdf workbench files i have made with amiberry in amibian.is this a bug with 2.25 version?

@midwan
Copy link

midwan commented Dec 24, 2019

@actraiser30 RPI4 support was added in 2.25 first, before v3.0 was released. It's just a new target in the Makefile ;)

@MichaIng
Copy link
Owner Author

@actraiser30
Since we never created Amiberry 2.25 binaries for Buster images, there is indeed no Amiberry 2.25 for RPi4 and for sure we'll not start to support outdated version 😉.

May I ask how you finally got it running (on RPi3 I assume)? With this?

@actraiser30
Copy link

clean install copy the files with mc installed workbench with the disks (pre-installed hdf files from amibian does not work) any release date for the Amiberry buster image?

@MichaIng
Copy link
Owner Author

MichaIng commented Dec 24, 2019

@actraiser30
Amiberry Buster image will be done shortly after DietPi v6.27 release.

I meanwhile confirmed the bug with Buster binaries on RPi2. GUI starts fine, hitting "Start" produces the segmentation fault. I have not installed anything to start, but I guess the related error should be no segmentation faul 😉. Not sure where this comes from. I tried installing the RPi repo libSDL2 packages but then Amiberry fails to "initialise EGL". I didn't have enough time to further investigate/compare all installed requirements about this (libegl1 + libgles2 + libgl1-mesa-dri installed of course + fkms overlay enabled). I'll re-compile the binaries for RPi Buster and see if this solves the issue.

@actraiser30
If you have a running Stretch instance now, might you find the time to test the Stretch images I compiled?

On RPi3:

cd /root
wget https://dietpi.com/downloads/binaries/stretch/amiberry_rpi3.tar.bz2
tar -xf amiberry_rpi3.tar.bz2
rm amiberry_rpi3.tar.bz2
cd amiberry
LD_LIBRARY_PATH=/root/amiberry/lib ./amiberry
# If the above fails, to test with old SDL2 libraries
./amiberry

@midwan
Another thing I recognised when trying to update the Whd database: The route command is used to test network connection. Since these commands/the net-tools is pretty outdated, please consider to switch to modern ip r instead, respectively iproute2 tools, which have the other advantage to not require root permissions and supersede the futures of net-tools anyway 😉.

@MichaIng
Copy link
Owner Author

MichaIng commented Dec 26, 2019

@actraiser30
Recompiled binaries for Buster as well, same procedure to test:

cd /root
wget https://dietpi.com/downloads/binaries/buster/amiberry_rpi3.tar.bz2
tar -xf amiberry_rpi3.tar.bz2
rm amiberry_rpi3.tar.bz2
cd amiberry
LD_LIBRARY_PATH=/root/amiberry/lib ./amiberry

I'll also run some real-world tests later.


@midwan
Do you compile your RPi binaries against self-compiled libSDL2 from source or against the ones from APT repo? Might it be a reason for binary failure that e.g. we ship libSDL2 2.0.10 (and most current libSDL2_image/ttf) while Raspbian Buster ships v2.0.9?

@actraiser30
Copy link

actraiser30 commented Dec 29, 2019

Hello, i tried the Recompiled binaries for Buster and it worked,deleted the old amiberry folder before in mnt/dietpi_userdata/amiberry and replaced it with the new one 3.0.11

looks like amiberry 2.25 has a major problem in rpi4 after i remove the power and insert it for example next day,the screen became black like there is no signal i had to press a few buttons and enter to come back to command line asking for username and pass whille the autoboot is set to boot directly to amiberry and worked flawless before.havent tried the strech yet,i think you should update the main DietPi buster image with this :wget https://dietpi.com/downloads/binaries/buster
in my case i used wget https://dietpi.com/downloads/binaries/buster/amiberry_rpi4.tar.bz2

and also the upcoming Amiberry image should include Amiberry 3.0.11 with the lib folder in it i think it helps

if i just copy the binnary of Amiberry with: wget https://dietpi.com/downloads/binaries/buster/amiberry_rpi4.tar.bz2
in mnt/dietpi_userdata/amiberry on a fresh DietPi image without install Amiberry from the software section and set it to autostart from the autostart section of DietPi will it work like that?

@MichaIng
Copy link
Owner Author

MichaIng commented Dec 29, 2019

@actraiser30
Many thanks for testing, great that it works flawlessly now. Little additional benefit that it is again a newer version, since @midwan is quite busy with improvements currently 👍.

without install Amiberry from the software section and set it to autostart from the autostart section of DietPi will it work like that?

You also need to create the systemd unit and install the dependencies, then it should work:

apt install libxml2 libfreetype6 libflac8 libmpeg2-4 libmpg123-0 net-tools libegl1
/DietPi/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d
cat << _EOF_ > /etc/systemd/system/amiberry.service
[Unit]
Description=Amiberry Amiga Emulator (DietPi)

[Service]
WorkingDirectory=$G_FP_DIETPI_USERDATA/amiberry
Environment=LD_LIBRARY_PATH=$G_FP_DIETPI_USERDATA/amiberry/lib
ExecStart=$G_FP_DIETPI_USERDATA/amiberry/amiberry

[Install]
WantedBy=local-fs.target
_EOF_

@actraiser30
Copy link

actraiser30 commented Jan 7, 2020

Thanks

i want to install plex server and transmission torrent server in a normal raspbian lite image without dietpi, i see that the commands to install it are in the dietpi-software file but they are all over the file and not just in one place,how can i do it, ??

@Joulinar
Copy link
Collaborator

Joulinar commented Jan 7, 2020

Hi,
if this is a normal raspbian lite image, than you would need to follow software vendor installation guides. As well there are a couple of installations Howto's on the web.

@actraiser30
Copy link

i know that but i believe the dietpi version of plex server is far better that this guides

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 8, 2020

@actraiser30
I link the two important parts:

  1. https://github.com/MichaIng/DietPi/blob/master/dietpi/dietpi-software#L4942-L4961
  2. https://github.com/MichaIng/DietPi/blob/master/dietpi/dietpi-software#L10134-L10149

As you can see, we use the official Plex APT repository and add the user (created by the package install) to render and dietpi group, the latter is obsolete on Raspbian of course.

For reference: https://support.plex.tv/articles/235974187-enable-repository-updating-for-supported-linux-server-distributions/

@actraiser30
Copy link

Thanks

so i put this two parts in a script with copy and paste and install it?

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 8, 2020

@actraiser30
In the first part, replace G_AGUP with apt-get update and G_AGI with apt-get -y install.
From the second link, usermod -aG render plex is all you need, everything else is DietPi-specific.
Then it should work on any Debian-based system, yes.

@actraiser30
Copy link

actraiser30 commented Jan 9, 2020

thanks about the transmission torrent server is the same thing to give me to do possible ?

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 9, 2020

@actraiser30
In case go through the dietpi-software script, it's always those two blocks with Banner_Installing respectively Banner_Configuration inside. Skip all steps with dietpi group or user and when its about moving some config/data dir to dietpi_userdata location. For many APT packages config/data is stored in /var/lib/<program_name>/ by default.

@actraiser30
Copy link

thanks the last one is about transmission server?

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 9, 2020

@actraiser30
This applies to all software titles, or do you mean the /var/lib/ thing?

See: https://packages.debian.org/buster/amd64/transmission-daemon/filelist
/var/lib/transmission-daemon/.config/transmission-daemon/settings.json
So /var/lib/transmission-daemon is the default home dir for the service run user, containing config and default data location, but of coursed this can be changed manually afterwards.
On DietPi those locations are usually moved/linked to /mnt/dietpi_userdata/<program_name>/, for downloaders default download dir to /mnt/dietpi_userdata/downloads. But since this is not available, nor would it be beneficial without e.g. mounting/linking this to an external drive, this should be skipped on non-DietPi systems.

@actraiser30
Copy link

sorry i mean how to install transmission server also the same way as plex in a normal rasbian image what sections i take from the dietpi-software file?

thanks

@MichaIng
Copy link
Owner Author

https://github.com/MichaIng/DietPi/blob/master/dietpi/dietpi-software#L3041
https://github.com/MichaIng/DietPi/blob/master/dietpi/dietpi-software#L7925-L7959

The second part can actually be skipped. It removes the sysvinit service, which is anyway ignored by systemd, applies dietpi group to the systemd unit, which is obsolete on Raspbian, and applies some settings, while the defaults will work fine as well of course and can be adjusted to personal needs afterwards.

So finally its just apt install transmission-daemon and you're good to go.

@actraiser30
Copy link

actraiser30 commented Feb 19, 2020

MichaIng can you make two script to install plex server and torrent server and post them here please?
i tried with your instructions but i was not successful at all

thanks

@MichaIng
Copy link
Owner Author

@actraiser30
Simply use dietpi-software or did you run in any issues with that? In case please open a new issue about that.

@actraiser30
Copy link

thanks i dont mean install them from dietpi but from a normal raspbian image

@MichaIng
Copy link
Owner Author

@actraiser30
Please look for the official install instructions from their websites, or go through our dietpi-software code. I cannot extract all the steps we do for all software titles for non-DietPi systems, sorry. Use DietPi or use Raspbian and follow official/3rd-party instructions 😉.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants